﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCCommon.TMS.Order;

namespace BCDto.TMS.TransportOrder
{
	/// <summary>
	/// 运输订单
	/// </summary>
	public class TransportOrderRequestDto
	{
		/// <summary>
		/// 运输订单编号
		/// </summary>		
		[Display(Name = "运输订单编号")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 6, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string TransportOrderNo { get; set; }
		/// <summary>
		/// 订单来源
		/// </summary>
		[Display(Name = "订单来源")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public OrderSourceType SourceType { get; set; }
		/// <summary>
		/// 用户Id
		/// </summary>		
		[Display(Name = "用户Id")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public long UserId { get; set; }
		/// <summary>
		/// 预约订单
		/// </summary>		
		[Display(Name = "预约订单")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public bool IsBook { get; set; }
		/// <summary>
		/// 预约时间
		/// </summary>		
		[Display(Name = "预约时间")]
		public DateTime? BookTime { get; set; }
		/// <summary>
		/// 是否已拆单
		/// </summary>		
		[Display(Name = "是否已拆单")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public bool IsSplitOrder { get; set; }
		/// <summary>
		/// 运单总金额
		/// </summary>		
		[Display(Name = "运单总金额")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public decimal TransportAmount { get; set; }
		/// <summary>
		/// 发货地区县Code
		/// </summary>		
		[Display(Name = "发货地区县Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(20, MinimumLength = 6, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string CountyCode { get; set; }
		/// <summary>
		/// 发货地经度
		/// </summary>		
		[Display(Name = "发货地经度")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public double Longitude { get; set; }
		/// <summary>
		/// 发货地纬度
		/// </summary>		
		[Display(Name = "发货地纬度")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public double Latitude { get; set; }
		/// <summary>
		/// 最终目的地区县Code
		/// </summary>		
		[Display(Name = "最终目的地区县Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(20, MinimumLength = 6, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string EndCountyCode { get; set; }
		/// <summary>
		/// 最终目的地经度
		/// </summary>		
		[Display(Name = "最终目的地经度")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public double EndLongitude { get; set; }
		/// <summary>
		/// 最终目的地纬度
		/// </summary>		
		[Display(Name = "最终目的地纬度")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public double EndLatitude { get; set; }
	}
}

